package com.bangdream.michelia.entity.courses;

import android.os.Parcel;
import android.os.Parcelable;

import com.alibaba.fastjson.JSON;

import java.util.ArrayList;
import java.util.List;

/**
 * @date on 2018/8/9 0:07
 * @email 909732184@qq.com
 * 课程章节
 */
public class ChapterListBean implements Parcelable {
    /**
     * id : c10d15e499c947b7b18970f99818536b
     * createBy : 1
     * createTime : 2018-07-24 10:07:24
     * updateBy : 1
     * updateTime : 2018-07-24 10:07:24
     * delFlag : 0
     * orgId : a
     * createName : admin
     * courseId : 75f3d1b9a7fd469abc80f5c1ec623d44
     * name : 11
     * number : 1
     * allHour : 15.0
     * sourceList : [{"id":"5acfefab863b4038ae71d1f9d053dd7d","createBy":"1","createTime":"2018-07-24 10:07:24","updateBy":"1","updateTime":"2018-07-24 10:07:24","delFlag":"0","orgId":"a","createName":"admin","courseId":"75f3d1b9a7fd469abc80f5c1ec623d44","chapterId":"c10d15e499c947b7b18970f99818536b","sourceId":"9b57402b93694948bd1d4080bc5170b9"}]
     */

    private String id;
    private String createBy;
    private String createTime;
    private String updateBy;
    private String updateTime;
    private String delFlag;
    private String orgId;
    private String createName;
    private String courseId;
    private String name;
    private int number;
    private double allHour;
    private List<SourceListBean> sourceList;
    @Override
    public String toString() {
        return JSON.toJSONString(this);
    }


    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getCreateBy() {
        return createBy;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public String getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(String updateBy) {
        this.updateBy = updateBy;
    }

    public String getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(String updateTime) {
        this.updateTime = updateTime;
    }

    public String getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    public String getOrgId() {
        return orgId;
    }

    public void setOrgId(String orgId) {
        this.orgId = orgId;
    }

    public String getCreateName() {
        return createName;
    }

    public void setCreateName(String createName) {
        this.createName = createName;
    }

    public String getCourseId() {
        return courseId;
    }

    public void setCourseId(String courseId) {
        this.courseId = courseId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getNumber() {
        return number;
    }

    public void setNumber(int number) {
        this.number = number;
    }

    public double getAllHour() {
        return allHour;
    }

    public void setAllHour(double allHour) {
        this.allHour = allHour;
    }

    public List<SourceListBean> getSourceList() {
        return sourceList;
    }

    public void setSourceList(List<SourceListBean> sourceList) {
        this.sourceList = sourceList;
    }


    public static class SourceListBean implements Parcelable {
        /**
         * id : 5acfefab863b4038ae71d1f9d053dd7d
         * createBy : 1
         * createTime : 2018-07-24 10:07:24
         * updateBy : 1
         * updateTime : 2018-07-24 10:07:24
         * delFlag : 0
         * orgId : a
         * createName : admin
         * courseId : 75f3d1b9a7fd469abc80f5c1ec623d44
         * chapterId : c10d15e499c947b7b18970f99818536b
         * sourceId : 9b57402b93694948bd1d4080bc5170b9
         */

        private String id;
        private String createBy;
        private String createTime;
        private String updateBy;
        private String updateTime;
        private String delFlag;
        private String orgId;
        private String createName;
        private String courseId;
        private String chapterId;
        private String sourceId;



        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getCreateBy() {
            return createBy;
        }

        public void setCreateBy(String createBy) {
            this.createBy = createBy;
        }

        public String getCreateTime() {
            return createTime;
        }

        public void setCreateTime(String createTime) {
            this.createTime = createTime;
        }

        public String getUpdateBy() {
            return updateBy;
        }

        public void setUpdateBy(String updateBy) {
            this.updateBy = updateBy;
        }

        public String getUpdateTime() {
            return updateTime;
        }

        public void setUpdateTime(String updateTime) {
            this.updateTime = updateTime;
        }

        public String getDelFlag() {
            return delFlag;
        }

        public void setDelFlag(String delFlag) {
            this.delFlag = delFlag;
        }

        public String getOrgId() {
            return orgId;
        }

        public void setOrgId(String orgId) {
            this.orgId = orgId;
        }

        public String getCreateName() {
            return createName;
        }

        public void setCreateName(String createName) {
            this.createName = createName;
        }

        public String getCourseId() {
            return courseId;
        }

        public void setCourseId(String courseId) {
            this.courseId = courseId;
        }

        public String getChapterId() {
            return chapterId;
        }

        public void setChapterId(String chapterId) {
            this.chapterId = chapterId;
        }

        public String getSourceId() {
            return sourceId;
        }

        public void setSourceId(String sourceId) {
            this.sourceId = sourceId;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.id);
            dest.writeString(this.createBy);
            dest.writeString(this.createTime);
            dest.writeString(this.updateBy);
            dest.writeString(this.updateTime);
            dest.writeString(this.delFlag);
            dest.writeString(this.orgId);
            dest.writeString(this.createName);
            dest.writeString(this.courseId);
            dest.writeString(this.chapterId);
            dest.writeString(this.sourceId);
        }

        public SourceListBean() {
        }

        protected SourceListBean(Parcel in) {
            this.id = in.readString();
            this.createBy = in.readString();
            this.createTime = in.readString();
            this.updateBy = in.readString();
            this.updateTime = in.readString();
            this.delFlag = in.readString();
            this.orgId = in.readString();
            this.createName = in.readString();
            this.courseId = in.readString();
            this.chapterId = in.readString();
            this.sourceId = in.readString();
        }

        public static final Creator<SourceListBean> CREATOR = new Creator<SourceListBean>() {
            @Override
            public SourceListBean createFromParcel(Parcel source) {
                return new SourceListBean(source);
            }

            @Override
            public SourceListBean[] newArray(int size) {
                return new SourceListBean[size];
            }
        };
    }


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.id);
        dest.writeString(this.createBy);
        dest.writeString(this.createTime);
        dest.writeString(this.updateBy);
        dest.writeString(this.updateTime);
        dest.writeString(this.delFlag);
        dest.writeString(this.orgId);
        dest.writeString(this.createName);
        dest.writeString(this.courseId);
        dest.writeString(this.name);
        dest.writeInt(this.number);
        dest.writeDouble(this.allHour);
        dest.writeTypedList(this.sourceList);
    }

    public ChapterListBean() {
    }

    protected ChapterListBean(Parcel in) {
        this.id = in.readString();
        this.createBy = in.readString();
        this.createTime = in.readString();
        this.updateBy = in.readString();
        this.updateTime = in.readString();
        this.delFlag = in.readString();
        this.orgId = in.readString();
        this.createName = in.readString();
        this.courseId = in.readString();
        this.name = in.readString();
        this.number = in.readInt();
        this.allHour = in.readDouble();
        this.sourceList = in.createTypedArrayList(SourceListBean.CREATOR);
    }

    public static final Creator<ChapterListBean> CREATOR = new Creator<ChapterListBean>() {
        @Override
        public ChapterListBean createFromParcel(Parcel source) {
            return new ChapterListBean(source);
        }

        @Override
        public ChapterListBean[] newArray(int size) {
            return new ChapterListBean[size];
        }
    };
}